<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration {
    /**
     * Run the migrations.
     */
    public function up(): void
    {
        Schema::create('user_notes', function (Blueprint $table) {
            $table->id();
            $table->integer('u_id')->nullable(false)->comment('用户id');
            $table->integer('classify')->nullable(false)->comment('分类id');
            $table->string('title')->nullable(false)->comment('标题');
            $table->longText('content')->nullable(false)->comment('内容');
            $table->timestamps();
            $table->comment('笔记表');
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::dropIfExists('user_notes');
    }
};
